<template>
  <div class="not-find-view">
    404
    <div v-if="redirect" class="redirect">
      <button @click="router.push(redirect)">返回</button>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();

const redirect = ref(null);

onMounted(() => {
  redirect.value = route.query?.redirect || null;
});
</script>
